Skip to content

sql: render "record" composite columns with the JSON tree viewer [UX-1330]#2533

Merged
c-julin merged 11 commits into
masterfrom
ux-1330-sql-record-type-label
Jun 25, 2026
Merged

sql: render "record" composite columns with the JSON tree viewer [UX-1330]#2533
c-julin merged 11 commits into
masterfrom
ux-1330-sql-record-type-label

Conversation

@c-julin

@c-julin c-julin commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What

The SQL backend is changing the column type label for composite (struct) columns from json/json[] to record/record[]. This updates the frontend renderer to recognize the new labels.

columnKindForPgType now maps record/record[] to the existing json display kind, so composite cells keep the nested JSON tree viewer and the catalog tree / cell popover surface the accurate record label instead of json.

Why

Labeling these columns json led Postgres users to try JSON arrow operators (->, ->>), which the engine rejects — composite columns are accessed with (col).field. The record label stops implying unsupported JSON semantics. Cell values are still rendered as JSON for readability; only the type label changes.

image

Paired change

Backend counterpart (must land together): redpanda-data/console-enterprise#803

Tests

vitest run on sql-types.test.ts + catalog-tree.test.tsx — 33 passed.

UX-1330

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Clean — no registry drift, off-token colours, or ad-hoc classes

App: frontend · Scope: diff vs origin/master · Files: 7

Count
⚠️ Outdated registry components 0
🛠 Locally-modified components 0
❓ Unknown to registry 0
🎨 Off-token palette colours 0
🔢 Ad-hoc utility classes 0

Generated by lookout audit-changes.

c-julin added 9 commits June 25, 2026 12:37
…1330]

The backend now labels composite (struct) columns "record"/"record[]"
instead of "json"/"json[]". Map those type strings to the json display
kind so composite cells keep the nested JSON tree viewer and the catalog
tree/cell popover show the "record" label.
The backend now appends an actionable hint after a blank line. Split it
off the error message and render it in the existing styled hint slot
below the alert, instead of inline in the message body.
Show the hint in an info Alert with a lightbulb icon and a "Hint" title
instead of loose muted text, so it reads clearly as guidance rather than
part of the error.
@c-julin c-julin force-pushed the ux-1330-sql-record-type-label branch from a6ae872 to 0233d02 Compare June 25, 2026 12:07
@c-julin c-julin merged commit 2f0436b into master Jun 25, 2026
17 checks passed
@c-julin c-julin deleted the ux-1330-sql-record-type-label branch June 25, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants